/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PnlListPo.java
 *
 * Created on 20 ม.ค. 2553, 2:12:42
 */

package warehouse;

/**
 *
 * @author Administrator
 */
public class PnlListPo extends javax.swing.JPanel {

    /** Creates new form PnlListPo */
    public PnlListPo() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlHeadListPo = new javax.swing.JPanel();
        lblHeadListPo = new javax.swing.JLabel();
        btnPoListEdit = new javax.swing.JButton();
        btnPoListSearch = new javax.swing.JButton();
        btnPoPrint = new javax.swing.JButton();
        btnAddPo = new javax.swing.JButton();
        pnlListPo = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblListPo = new javax.swing.JTable();
        lblPoCode = new javax.swing.JLabel();
        lblDePrCode = new javax.swing.JLabel();
        lblSuCode = new javax.swing.JLabel();
        lblPoDate = new javax.swing.JLabel();
        lblPoDateSent = new javax.swing.JLabel();
        txtDePrCode = new javax.swing.JTextField();
        txtPoCode = new javax.swing.JTextField();
        txtSuCode = new javax.swing.JTextField();
        txtPoDateSent = new javax.swing.JTextField();
        txtPoDate = new javax.swing.JTextField();
        lblStCode = new javax.swing.JLabel();
        rbtStaBuyWait = new javax.swing.JRadioButton();
        rbtStaBuyApproval = new javax.swing.JRadioButton();
        rbtStaBuyCancel = new javax.swing.JRadioButton();
        rbtStaBuyClose = new javax.swing.JRadioButton();
        lblTyCode = new javax.swing.JLabel();
        lblProCode = new javax.swing.JLabel();
        txtProCode = new javax.swing.JTextField();
        lblProName = new javax.swing.JLabel();
        txtProName = new javax.swing.JTextField();
        txtTyCode = new javax.swing.JTextField();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        pnlHeadListPo.setBackground(new java.awt.Color(204, 255, 204));
        pnlHeadListPo.setMaximumSize(new java.awt.Dimension(700, 80));
        pnlHeadListPo.setMinimumSize(new java.awt.Dimension(700, 80));
        pnlHeadListPo.setPreferredSize(new java.awt.Dimension(700, 80));

        lblHeadListPo.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblHeadListPo.setText("จัดการการสั่งซื้อ");

        btnPoListEdit.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        btnPoListEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/edit1_30x30.gif"))); // NOI18N
        btnPoListEdit.setMaximumSize(new java.awt.Dimension(75, 30));
        btnPoListEdit.setMinimumSize(new java.awt.Dimension(75, 30));
        btnPoListEdit.setPreferredSize(new java.awt.Dimension(75, 30));

        btnPoListSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/search_30x30.gif"))); // NOI18N

        btnPoPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnPoPrint.setMaximumSize(new java.awt.Dimension(40, 40));
        btnPoPrint.setMinimumSize(new java.awt.Dimension(40, 40));
        btnPoPrint.setPreferredSize(new java.awt.Dimension(40, 40));

        btnAddPo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/addd copy.gif"))); // NOI18N
        btnAddPo.setMaximumSize(new java.awt.Dimension(40, 40));
        btnAddPo.setMinimumSize(new java.awt.Dimension(40, 40));
        btnAddPo.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout pnlHeadListPoLayout = new javax.swing.GroupLayout(pnlHeadListPo);
        pnlHeadListPo.setLayout(pnlHeadListPoLayout);
        pnlHeadListPoLayout.setHorizontalGroup(
            pnlHeadListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadListPoLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlHeadListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblHeadListPo)
                    .addGroup(pnlHeadListPoLayout.createSequentialGroup()
                        .addComponent(btnPoListSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnPoListEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnAddPo, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(btnPoPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(490, Short.MAX_VALUE))
        );
        pnlHeadListPoLayout.setVerticalGroup(
            pnlHeadListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadListPoLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(lblHeadListPo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlHeadListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnPoPrint, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(pnlHeadListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(btnPoListSearch, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                        .addComponent(btnPoListEdit, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE))
                    .addComponent(btnAddPo, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        add(pnlHeadListPo, java.awt.BorderLayout.PAGE_START);

        tblListPo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tblListPo.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "ประเภทสินค้า", "รหัสสินค้า", "รายการสินค้า", "ราคา/หน่วย", "หน่วย"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblListPo);

        lblPoCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblPoCode.setText("รหัสใบสั่งซื้อ :");

        lblDePrCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblDePrCode.setText("รหัสใบขอซื้อ :");

        lblSuCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblSuCode.setText("รหัสผู้จำหน่าย :");

        lblPoDate.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblPoDate.setText("วันที่ออกใบสั่งซื้อ :");

        lblPoDateSent.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblPoDateSent.setText("วันที่กำหนดส่ง :");

        txtDePrCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        txtPoCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        txtSuCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        txtPoDateSent.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        txtPoDate.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        lblStCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblStCode.setText("สถานะการซื้อ :");

        rbtStaBuyWait.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        rbtStaBuyWait.setText("รออนุมัติ");
        rbtStaBuyWait.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaBuyWaitActionPerformed(evt);
            }
        });

        rbtStaBuyApproval.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        rbtStaBuyApproval.setText("อนุมัติ");
        rbtStaBuyApproval.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaBuyApprovalActionPerformed(evt);
            }
        });

        rbtStaBuyCancel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        rbtStaBuyCancel.setText("ยกเลิก");
        rbtStaBuyCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaBuyCancelActionPerformed(evt);
            }
        });

        rbtStaBuyClose.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        rbtStaBuyClose.setText("ปิดใบงาน");
        rbtStaBuyClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaBuyCloseActionPerformed(evt);
            }
        });

        lblTyCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblTyCode.setText("ประเภทสินค้า :");

        lblProCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblProCode.setText("รหัสสินค้า :");

        txtProCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        lblProName.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblProName.setText("รายการสินค้า :");

        txtProName.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        txtTyCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        javax.swing.GroupLayout pnlListPoLayout = new javax.swing.GroupLayout(pnlListPo);
        pnlListPo.setLayout(pnlListPoLayout);
        pnlListPoLayout.setHorizontalGroup(
            pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlListPoLayout.createSequentialGroup()
                .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(pnlListPoLayout.createSequentialGroup()
                            .addGap(20, 20, 20)
                            .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(lblProCode)
                                .addComponent(lblPoCode)
                                .addComponent(lblSuCode)
                                .addComponent(lblPoDate))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(txtPoDate)
                                .addComponent(txtSuCode)
                                .addComponent(txtProCode)
                                .addComponent(txtPoCode, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(lblTyCode)
                                .addComponent(lblDePrCode)
                                .addComponent(lblProName)
                                .addComponent(lblPoDateSent))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txtPoDateSent, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                                .addComponent(txtDePrCode, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                                .addComponent(txtTyCode, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                                .addComponent(txtProName, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                            .addGap(114, 114, 114))
                        .addGroup(pnlListPoLayout.createSequentialGroup()
                            .addGap(25, 25, 25)
                            .addComponent(lblStCode)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(rbtStaBuyWait)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(rbtStaBuyApproval)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(rbtStaBuyCancel)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(rbtStaBuyClose)))
                    .addGroup(pnlListPoLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 678, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlListPoLayout.setVerticalGroup(
            pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlListPoLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtPoCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lblPoCode))
                    .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lblDePrCode)
                        .addComponent(txtDePrCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblTyCode)
                    .addComponent(txtTyCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSuCode)
                    .addComponent(txtSuCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProCode)
                    .addComponent(txtProCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblProName)
                    .addComponent(txtProName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lblPoDate)
                        .addComponent(txtPoDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblPoDateSent)
                    .addComponent(txtPoDateSent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlListPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtStaBuyWait)
                    .addComponent(rbtStaBuyApproval)
                    .addComponent(rbtStaBuyCancel)
                    .addComponent(rbtStaBuyClose)
                    .addComponent(lblStCode))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(104, 104, 104))
        );

        add(pnlListPo, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    private void rbtStaBuyWaitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaBuyWaitActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaBuyWaitActionPerformed

    private void rbtStaBuyApprovalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaBuyApprovalActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaBuyApprovalActionPerformed

    private void rbtStaBuyCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaBuyCancelActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaBuyCancelActionPerformed

    private void rbtStaBuyCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaBuyCloseActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaBuyCloseActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAddPo;
    private javax.swing.JButton btnPoListEdit;
    private javax.swing.JButton btnPoListSearch;
    private javax.swing.JButton btnPoPrint;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblDePrCode;
    private javax.swing.JLabel lblHeadListPo;
    private javax.swing.JLabel lblPoCode;
    private javax.swing.JLabel lblPoDate;
    private javax.swing.JLabel lblPoDateSent;
    private javax.swing.JLabel lblProCode;
    private javax.swing.JLabel lblProName;
    private javax.swing.JLabel lblStCode;
    private javax.swing.JLabel lblSuCode;
    private javax.swing.JLabel lblTyCode;
    private javax.swing.JPanel pnlHeadListPo;
    private javax.swing.JPanel pnlListPo;
    private javax.swing.JRadioButton rbtStaBuyApproval;
    private javax.swing.JRadioButton rbtStaBuyCancel;
    private javax.swing.JRadioButton rbtStaBuyClose;
    private javax.swing.JRadioButton rbtStaBuyWait;
    private javax.swing.JTable tblListPo;
    private javax.swing.JTextField txtDePrCode;
    private javax.swing.JTextField txtPoCode;
    private javax.swing.JTextField txtPoDate;
    private javax.swing.JTextField txtPoDateSent;
    private javax.swing.JTextField txtProCode;
    private javax.swing.JTextField txtProName;
    private javax.swing.JTextField txtSuCode;
    private javax.swing.JTextField txtTyCode;
    // End of variables declaration//GEN-END:variables

}
